/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * PantallaNuevaVenta.java
 *
 * Created on 18/09/2011, 18:31:48
 */

package interfacesGraficas;

import com.toedter.calendar.JDateChooser;
import javax.swing.JButton;
import javax.swing.JInternalFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.JTextField;
import javax.swing.JToolBar;

/**
 *
 * @author eduardo
 */
public class PantallaNuevaVenta extends javax.swing.JFrame {

    /** Creates new form PantallaNuevaVenta */
    public PantallaNuevaVenta() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {
        java.awt.GridBagConstraints gridBagConstraints;

        jInternalFrame1 = new javax.swing.JInternalFrame();
        jButton5 = new javax.swing.JButton();
        jToolBar1 = new javax.swing.JToolBar();
        botonGuardarNuevaVenta = new javax.swing.JButton();
        botonSalirNvaVenta = new javax.swing.JButton();
        jPanel1 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        campoNNuevaVenta = new javax.swing.JTextField();
        campoClienteNvaVenta = new javax.swing.JTextField();
        campoPedidoNuevaVenta = new javax.swing.JTextField();
        botonClienteNuevaVenta = new javax.swing.JButton();
        botonPedidoNuevaVenta = new javax.swing.JButton();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        campoTipoNuevaVenta = new javax.swing.JTextField();
        campoFechaNuevaVenta = new com.toedter.calendar.JDateChooser();
        botonAgregarDetalleVenta = new javax.swing.JButton();
        jPanel2 = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        tablaNuevaVenta = new javax.swing.JTable();
        campoTotalNuevaVenta = new javax.swing.JTextField();
        jLabel6 = new javax.swing.JLabel();

        jInternalFrame1.setVisible(true);

        javax.swing.GroupLayout jInternalFrame1Layout = new javax.swing.GroupLayout(jInternalFrame1.getContentPane());
        jInternalFrame1.getContentPane().setLayout(jInternalFrame1Layout);
        jInternalFrame1Layout.setHorizontalGroup(
            jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE)
        );
        jInternalFrame1Layout.setVerticalGroup(
            jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE)
        );

        jButton5.setText("jButton5");

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        getContentPane().setLayout(new java.awt.GridBagLayout());

        jToolBar1.setRollover(true);

        botonGuardarNuevaVenta.setIcon(new javax.swing.ImageIcon(getClass().getResource("/utilidades/imagenes/iconos/Save_30.png"))); // NOI18N
        botonGuardarNuevaVenta.setToolTipText("Guardar Venta");
        botonGuardarNuevaVenta.setFocusable(false);
        botonGuardarNuevaVenta.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        botonGuardarNuevaVenta.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jToolBar1.add(botonGuardarNuevaVenta);

        botonSalirNvaVenta.setIcon(new javax.swing.ImageIcon(getClass().getResource("/utilidades/imagenes/iconos/Log-out-30.png"))); // NOI18N
        botonSalirNvaVenta.setToolTipText("Salir");
        botonSalirNvaVenta.setFocusable(false);
        botonSalirNvaVenta.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        botonSalirNvaVenta.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jToolBar1.add(botonSalirNvaVenta);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.ipadx = 400;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        getContentPane().add(jToolBar1, gridBagConstraints);

        jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Venta"));
        jPanel1.setLayout(new java.awt.GridBagLayout());

        jLabel1.setText("Nº Venta:");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(20, 10, 0, 0);
        jPanel1.add(jLabel1, gridBagConstraints);

        jLabel2.setText("Cliente:");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(10, 10, 0, 0);
        jPanel1.add(jLabel2, gridBagConstraints);

        jLabel3.setText("Nº Pedido:");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(10, 10, 0, 0);
        jPanel1.add(jLabel3, gridBagConstraints);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.ipadx = 100;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(15, 5, 0, 0);
        jPanel1.add(campoNNuevaVenta, gridBagConstraints);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.ipadx = 100;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 0, 0);
        jPanel1.add(campoClienteNvaVenta, gridBagConstraints);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.ipadx = 100;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 0, 0);
        jPanel1.add(campoPedidoNuevaVenta, gridBagConstraints);

        botonClienteNuevaVenta.setIcon(new javax.swing.ImageIcon(getClass().getResource("/utilidades/imagenes/iconos/Search-20.png"))); // NOI18N
        botonClienteNuevaVenta.setToolTipText("Buscar Cliente");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(2, 10, 0, 0);
        jPanel1.add(botonClienteNuevaVenta, gridBagConstraints);

        botonPedidoNuevaVenta.setIcon(new javax.swing.ImageIcon(getClass().getResource("/utilidades/imagenes/iconos/Search-20.png"))); // NOI18N
        botonPedidoNuevaVenta.setToolTipText("Buscar Pedido");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(2, 10, 0, 0);
        jPanel1.add(botonPedidoNuevaVenta, gridBagConstraints);

        jLabel4.setText("Fecha Venta:");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 3;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(20, 20, 0, 0);
        jPanel1.add(jLabel4, gridBagConstraints);

        jLabel5.setText("Tipo Venta:");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 3;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(10, 20, 0, 0);
        jPanel1.add(jLabel5, gridBagConstraints);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 4;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.ipadx = 100;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 0, 0);
        jPanel1.add(campoTipoNuevaVenta, gridBagConstraints);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 4;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.ipadx = 17;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(15, 5, 0, 20);
        jPanel1.add(campoFechaNuevaVenta, gridBagConstraints);

        botonAgregarDetalleVenta.setText("Agregar Detalle");
        botonAgregarDetalleVenta.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botonAgregarDetalleVentaActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 4;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(10, 5, 0, 0);
        jPanel1.add(botonAgregarDetalleVenta, gridBagConstraints);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(10, 10, 0, 0);
        getContentPane().add(jPanel1, gridBagConstraints);

        jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder("Detalle Venta"));

        tablaNuevaVenta.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        jScrollPane1.setViewportView(tablaNuevaVenta);

        campoTotalNuevaVenta.setEnabled(false);

        jLabel6.setText("Total:");

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGap(26, 26, 26)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(jLabel6)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(campoTotalNuevaVenta, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(103, Short.MAX_VALUE))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 18, Short.MAX_VALUE)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(campoTotalNuevaVenta, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel6)))
        );

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(10, 10, 20, 0);
        getContentPane().add(jPanel2, gridBagConstraints);

        pack();
    }// </editor-fold>//GEN-END:initComponents

private void botonAgregarDetalleVentaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botonAgregarDetalleVentaActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_botonAgregarDetalleVentaActionPerformed

    /**
    * @param args the command line arguments
    */
   

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton botonAgregarDetalleVenta;
    private javax.swing.JButton botonClienteNuevaVenta;
    private javax.swing.JButton botonGuardarNuevaVenta;
    private javax.swing.JButton botonPedidoNuevaVenta;
    private javax.swing.JButton botonSalirNvaVenta;
    private javax.swing.JTextField campoClienteNvaVenta;
    private com.toedter.calendar.JDateChooser campoFechaNuevaVenta;
    private javax.swing.JTextField campoNNuevaVenta;
    private javax.swing.JTextField campoPedidoNuevaVenta;
    private javax.swing.JTextField campoTipoNuevaVenta;
    private javax.swing.JTextField campoTotalNuevaVenta;
    private javax.swing.JButton jButton5;
    private javax.swing.JInternalFrame jInternalFrame1;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JToolBar jToolBar1;
    private javax.swing.JTable tablaNuevaVenta;
    // End of variables declaration//GEN-END:variables

    public JButton getBotonAgregarDetalleVenta() {
        return botonAgregarDetalleVenta;
    }

    public JTextField getCampoTotalNuevaVenta() {
        return campoTotalNuevaVenta;
    }

    public void setCampoTotalNuevaVenta(JTextField campoTotalNuevaVenta) {
        this.campoTotalNuevaVenta = campoTotalNuevaVenta;
    }

    

    public void setBotonAgregarDetalleVenta(JButton botonAgregarDetalleVenta) {
        this.botonAgregarDetalleVenta = botonAgregarDetalleVenta;
    }

    public JButton getBotonGuardarNuevaVenta() {
        return botonGuardarNuevaVenta;
    }

    public void setBotonGuardarNuevaVenta(JButton botonGuardarNuevaVenta) {
        this.botonGuardarNuevaVenta = botonGuardarNuevaVenta;
    }

    public JButton getBotonSalirNvaVenta() {
        return botonSalirNvaVenta;
    }

    public void setBotonSalirNvaVenta(JButton botonSalirNvaVenta) {
        this.botonSalirNvaVenta = botonSalirNvaVenta;
    }

    public JTextField getCampoClienteNvaVenta() {
        return campoClienteNvaVenta;
    }

    public void setCampoClienteNvaVenta(JTextField campoClienteNvaVenta) {
        this.campoClienteNvaVenta = campoClienteNvaVenta;
    }

    public JDateChooser getCampoFechaNuevaVenta() {
        return campoFechaNuevaVenta;
    }

    public void setCampoFechaNuevaVenta(JDateChooser campoFechaNuevaVenta) {
        this.campoFechaNuevaVenta = campoFechaNuevaVenta;
    }

    public JTextField getCampoNNuevaVenta() {
        return campoNNuevaVenta;
    }

    public void setCampoNNuevaVenta(JTextField campoNNuevaVenta) {
        this.campoNNuevaVenta = campoNNuevaVenta;
    }

    public JTextField getCampoPedidoNuevaVenta() {
        return campoPedidoNuevaVenta;
    }

    public void setCampoPedidoNuevaVenta(JTextField campoPedidoNuevaVenta) {
        this.campoPedidoNuevaVenta = campoPedidoNuevaVenta;
    }

    public JTextField getCampoTipoNuevaVenta() {
        return campoTipoNuevaVenta;
    }

    public void setCampoTipoNuevaVenta(JTextField campoTipoNuevaVenta) {
        this.campoTipoNuevaVenta = campoTipoNuevaVenta;
    }

    public JButton getjButton2() {
        return botonClienteNuevaVenta;
    }

    

    public JButton getjButton5() {
        return jButton5;
    }

    public void setjButton5(JButton jButton5) {
        this.jButton5 = jButton5;
    }

    public JInternalFrame getjInternalFrame1() {
        return jInternalFrame1;
    }

    public void setjInternalFrame1(JInternalFrame jInternalFrame1) {
        this.jInternalFrame1 = jInternalFrame1;
    }

    public JLabel getjLabel1() {
        return jLabel1;
    }

    public void setjLabel1(JLabel jLabel1) {
        this.jLabel1 = jLabel1;
    }

    public JLabel getjLabel2() {
        return jLabel2;
    }

    public void setjLabel2(JLabel jLabel2) {
        this.jLabel2 = jLabel2;
    }

    public JLabel getjLabel3() {
        return jLabel3;
    }

    public void setjLabel3(JLabel jLabel3) {
        this.jLabel3 = jLabel3;
    }

    public JLabel getjLabel4() {
        return jLabel4;
    }

    public void setjLabel4(JLabel jLabel4) {
        this.jLabel4 = jLabel4;
    }

    public JLabel getjLabel5() {
        return jLabel5;
    }

    public void setjLabel5(JLabel jLabel5) {
        this.jLabel5 = jLabel5;
    }

    public JPanel getjPanel1() {
        return jPanel1;
    }

    public void setjPanel1(JPanel jPanel1) {
        this.jPanel1 = jPanel1;
    }

    public JPanel getjPanel2() {
        return jPanel2;
    }

    public void setjPanel2(JPanel jPanel2) {
        this.jPanel2 = jPanel2;
    }

    public JScrollPane getjScrollPane1() {
        return jScrollPane1;
    }

    public void setjScrollPane1(JScrollPane jScrollPane1) {
        this.jScrollPane1 = jScrollPane1;
    }

    public JToolBar getjToolBar1() {
        return jToolBar1;
    }

    public void setjToolBar1(JToolBar jToolBar1) {
        this.jToolBar1 = jToolBar1;
    }

    public JTable getTablaNuevaVenta() {
        return tablaNuevaVenta;
    }

    public void setTablaNuevaVenta(JTable tablaNuevaVenta) {
        this.tablaNuevaVenta = tablaNuevaVenta;
    }

    public JButton getBotonClienteNuevaVenta() {
        return botonClienteNuevaVenta;
    }

    public void setBotonClienteNuevaVenta(JButton botonClienteNuevaVenta) {
        this.botonClienteNuevaVenta = botonClienteNuevaVenta;
    }

    public JButton getBotonPedidoNuevaVenta() {
        return botonPedidoNuevaVenta;
    }

    public void setBotonPedidoNuevaVenta(JButton botonPedidoNuevaVenta) {
        this.botonPedidoNuevaVenta = botonPedidoNuevaVenta;
    }


    

}
